web3.js@0.2x.x web3.eth.syncing
web3.eth.syncing
ใใผใใๅๆไธญใงใใใฐ "sync ใชใใธใงใฏใ"ใใๅๆไธญใงใชใใใฐ false ใ่ฟใใใพใใ
ใใฎใใญใใใฃใฏ่ชญใฟๅใๅฐ็จใงใใ
ๆปใๅค
Object|Boolean
ใใผใใๅๆไธญใงใใใฐใใคใใฎ "sync ใชใใธใงใฏใ" ใใใใใงใชใใใฐ false ใ่ฟใใใพใใ
startingBlock : Number
ๅๆใ้ๅงใใใใญใใฏ็ชๅท
currentBlock : Number
็พๅจๅๆๆธใฟใฎใใญใใฏ็ชๅท
highestBlock : Number
ๅๆไบๅฎใฎใใญใใฏ็ชๅท๏ผไบๆธฌๅค๏ผ
ใตใณใใซใณใผใ
code:example.js
var sync = web3.eth.syncing;
console.log(sync);
/*
{
startingBlock: 300,
currentBlock: 312,
highestBlock: 512
}
*/
ๅ่